<style>
#SrodneDelatnosti{
	width:550px;
}
#SrodneDelatnosti ol li{
	float:left;
	clear:both;
	margin:0px;
	padding:5px;
	cursor:default;
}
#SrodneDelatnosti ol li strong{
	float:left;
	margin:0px;
}
#SrodneDelatnosti ol li:hover{
	background:#fff;
}
#SrodneDelatnosti input.delete{
	background-color:transparent;
	border:none;
	float:right;
	cursor:pointer;
	margin:0px;
}
</style>
<div id="SrodneDelatnosti" class="area">
	<h1>Srodne delatnosti</h1>
	<form method="post" action="javascript:void(0)" onsubmit="submitForm(this,'delatnosti.php','POST','setContent')">
		<input type="hidden" name="a" value="family" />
		
		<!--<select name="filter_del" id="filter_del" onchange="var btn=document.getElementById('addFamilyDel'); btn.style.display=this.value>0?'block':'none';">-->
		<select name="filter_del" id="filter_del">
			<option value="-1">---</option>
			{{%loop start delatnost_id}}
			<option value="{{$delatnost_id}}" {{$delatnost_selected}}>{{$delatnost_name}}</option>
			{{%loop end}}
		</select>
		<input type="submit" value="filter" class="searchBtn" style="float:left;" />
		<input id="addFamilyDel" style="clear:none; display:{{$display_add_del}}" type="button" onclick="var grp=parseInt('{{$family_group}}'); var del=document.getElementById('filter_del').value; if(del>0 && grp>0){LoadRSDoc('delatnosti.php?a=family&mod=add&delid='+del+'&group={{$family_group}}','afterSrodneDelatnostiAdd(\''+grp+'\')')}" class="novi" value="dodaj delatnost" />
		<br clear="all" />
		<input type="button" onclick="SrodneDelatnostiCreate(document.getElementById('filter_del').value,document.getElementById('new_family_del2').value)" class="novi" id="newfamilybtn" value="nova familija" style="display:{{$display_new_family}};" />
		<select name="new_family_del2" id="new_family_del2" style="display:{{$display_new_family}};">
			{{%loop start delatnost_id}}
			<option value="{{$delatnost_id}}">{{$delatnost_name}}</option>
			{{%loop end}}
		</select>
			</form><br clear="all" />
	<div id="SrodneDelatnostiResult">
		{{$comment_start}}
		<h1>{{$family_group_name}}</h1>
		<input style="display:{{$display_delete_all}}" value="sve" type="button" class="delete" onclick="var grp=parseInt('{{$family_group}}'); if(grp>0){if(confirm('Da li želite da obrišete celu familiju delatnosti?')){LoadRSDoc('delatnosti.php?a=family&mod=empty&group={{$family_group}}','afterSrodneDelatnostiDelete')}}" /></li>
		<ol group="{{$family_group}}">
			{{%loop start family_del_id}}
			<li>
				<strong>{{$family_del_ime}}</strong>
				<input type="button" class="delete" onclick="if(confirm('Da li želite da obrišete delatnost iz familije delatnosti?')){LoadRSDoc('delatnosti.php?a=family&mod=delete&delid={{$family_del_id}}&group={{$family_del_group}}','afterSrodneDelatnostiDelete')}" /></li>
			{{%loop end}}
		</ol>
		{{$comment_end}}
	</div>
</div>